﻿@using (Html.Bootstrap().Container().Begin())
{
    @Html.Bootstrap().Heading1("Standard Navbar")
    using (Html.Bootstrap().Div().SetId("test-standard-navbar").Begin())
    {
        using (var navbar = Html.Bootstrap().Navbar("MyApp").Begin())
        {
            @navbar.NavbarLink("A")
            @navbar.NavbarLink("B")
        }
    }

    <hr />
    
    @Html.Bootstrap().Heading1("Non-fluid Navbar")
    using (Html.Bootstrap().Div().SetId("test-nonfluid-navbar").Begin())
    {
        using (var navbar = Html.Bootstrap().Navbar("MyApp").SetId("nav2").Begin())
        {
            @navbar.NavbarLink("A")
            @navbar.NavbarLink("B")
        }
    }

    <hr />
    
    @Html.Bootstrap().Heading1("Fixed Navbar")
    using (Html.Bootstrap().Div().SetId("test-fixed-navbar").Begin())
    {
        using (var navbar = Html.Bootstrap().Navbar("MyApp").SetId("nav3").SetPosition(NavbarPosition.FixedBottm).Begin())
        {
            @navbar.NavbarLink("A")
            @navbar.NavbarLink("B")
        }
    }

    <hr />

    @Html.Bootstrap().Heading1("Static Navbar")
    using (Html.Bootstrap().Div().SetId("test-static-navbar").Begin())
    {
        using (var navbar = Html.Bootstrap().Navbar("MyApp").SetId("nav4").SetPosition(NavbarPosition.StaticTop).Begin())
        {
            @navbar.NavbarLink("A")
            @navbar.NavbarLink("B")
        }
    }

    <hr />

    @Html.Bootstrap().Heading1("Inverse Navbar")
    using (Html.Bootstrap().Div().SetId("test-inverse-navbar").Begin())
    {
        using (var navbar = Html.Bootstrap().Navbar("MyApp").SetId("nav5").SetInverse().Begin())
        {
            @navbar.NavbarLink("A")
            @navbar.NavbarLink("B")
        }
    }

    <hr />

    @Html.Bootstrap().Heading1("Manual Navbar")
    using (Html.Bootstrap().Div().SetId("test-manual-navbar").Begin())
    {
        using (var navbar = Html.Bootstrap().Navbar().SetId("nav6").Begin())
        {
            using(var navbarHeader = navbar.NavbarHeader().Begin())
            {
                @navbarHeader.Brand("MyApp")
                @navbarHeader.NavbarToggle()
            }
            using (var navbarCollapse = navbar.NavbarCollapse().Begin())
            {
                using (var nav = navbarCollapse.NavbarNav().Begin())
                {
                    @nav.NavbarLink("A")
                    using (var dropdown = nav.Dropdown("B").Begin())
                    {
                        @dropdown.DropdownLink("C")
                        @dropdown.DropdownLink("D")
                    }
                }
                using (var form = navbarCollapse.NavbarForm().Begin())
                {
                    @form.Input("Search").SetPlaceholder("Search")
                    @form.Submit("Submit")
                }
                using (var nav = navbarCollapse.NavbarNav().Begin())
                {
                    @nav.NavbarLink("B")
                }
                @navbarCollapse.NavbarButton("Warn").SetState(ButtonState.Warning)
                using(navbarCollapse.NavbarText().SetRight().Begin())
                {
                    <text>Logged in as @Html.Bootstrap().Link("Dave")</text>
                }
                using (var nav = navbarCollapse.NavbarNav().SetRight().Begin())
                {
                    @nav.NavbarLink("R")
                }
            }
        }
    }

    <hr />

    @Html.Bootstrap().Heading1("Implicit Sections")
    using (Html.Bootstrap().Div().SetId("test-implicit-sections").Begin())
    {
        using (var navbar = Html.Bootstrap().Navbar().SetId("nav7").Begin())
        {
            @navbar.Brand("MyApp")
            @navbar.NavbarToggle()
            @navbar.NavbarLink("A")
            using(var dropdown = navbar.Dropdown("B").Begin())
            {
                @dropdown.DropdownLink("C")
                @dropdown.DropdownLink("D")
            }
            using(var form = navbar.NavbarForm().Begin())
            {
                @form.Input("Search").SetPlaceholder("Search")
                @form.Submit("Submit")
            }
            @navbar.NavbarLink("B")
            @navbar.NavbarButton("Warn").SetState(ButtonState.Warning)
            using (navbar.NavbarText().SetRight().Begin())
            {
                <text>Logged in as @Html.Bootstrap().Link("Dave")</text>
            }
        }
    }
}
